package cn.idu.io;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.nio.charset.StandardCharsets;

public class FileReaderTest {

    public static void readFile(String path) throws IOException {
        try (Reader reader = new FileReader(path, StandardCharsets.UTF_8)) {
            int n;
            while ((n = reader.read()) != -1) {
                System.out.println((char) n);
            }
        }
    }
}
